package com.wenli.lt.mapper;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.wenli.lt.entity.Goods;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.wenli.lt.entity.po.GoodOrderPo;
import com.wenli.lt.entity.po.goodsInfo;
import com.wenli.lt.entity.po.goodsVo;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author lt
 * @since 2021-03-23
 */
public interface GoodsMapper extends BaseMapper<Goods> {

    IPage<goodsVo> getGoodsListPage(Page page,
                                    @Param("goodsName") String goodsName,
                                    @Param("classification")Integer classification,
                                    @Param("collectionCount") Integer collectionCount,
                                    @Param("reportlistCount") Integer reportlistCount,
                                    @Param("createTime") Integer createTime
                                    );

    List<Map> getGoodList(@Param("studentNumber") String studentNumber);


    List<GoodOrderPo> getBuyGoodList(@Param("studentNumber") String studentNumber);

    List<goodsVo> getGoods(@Param("studentNumber") String studentNumber);

    List<GoodOrderPo> getNoBuyGoodList(@Param("studentNumber") String studentNumber);

    IPage<goodsInfo> selectGoodsInfo(Page page, @Param("goodsName") String goodsName, @Param("classification") Integer classification);

    int insertGoods(@Param("goods")Goods goods);

    List<GoodOrderPo> wantuyGoodList(@Param("studentNumber")String studentNumber);
}
